home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / utility / srdsk205.zip / SRDISK.DOC < prev    next >
Text File  |  1994-01-31  |  36KB  |  905 lines

  1.  
  2.                               SRDISK (TM)
  3.                     ReSizeable RAMDisk version 2.05
  4.                          for XMS and EMS memory
  5.  
  6.                  Copyright (c) 1991-1994 Marko Kohtala
  7.                           All rights reserved
  8.  
  9.  
  10.  
  11. CONTENTS
  12.  
  13.   1. Disclaimer of warranty
  14.   2. License
  15.   3. Features included
  16.   4. Files in this release
  17.   5. Usage
  18.   5.1. Basic installation
  19.   5.2. SRDISK device driver
  20.   5.2.1. XMS memory device driver
  21.   5.2.2. EMS memory device driver
  22.   5.2.3. EMS 3.2 memory device driver
  23.   5.3. SRDUMMY device driver
  24.   5.4. SRDISK program
  25.   5.4.1 SRDISK sample commands
  26.   5.4.2 SRDISK command line options
  27.   6. Troubleshooting
  28.   7. Trademarks
  29.   8. Last words
  30.  
  31.  
  32.  
  33.                        1. DISCLAIMER OF WARRANTY
  34.  
  35. THIS SOFTWARE AND MANUAL ARE PROVIDED "AS IS" AND WITHOUT WARRANTIES AS 
  36. TO PERFORMANCE OF MERCHANTABILITY OR ANY OTHER WARRANTIES WHETHER 
  37. EXPRESSED OR IMPLIED.  BECAUSE OF THE VARIOUS HARDWARE AND SOFTWARE 
  38. ENVIRONMENTS IN WHICH THIS PROGRAM MAY BE USED, NO WARRANTY OF FITNESS 
  39. FOR A PARTICULAR PURPOSE IS OFFERED.
  40.  
  41. GOOD DATA PROCESSING PROCEDURE DICTATES THAT ANY PROGRAM BE THOROUGHLY
  42. TESTED WITH NON-CRITICAL DATA BEFORE RELYING ON IT.  THE USER MUST
  43. ASSUME THE ENTIRE RISK OF USING THE PROGRAM.  ANY LIABILITY OF THE
  44. SELLER WILL BE LIMITED EXCLUSIVELY TO PRODUCT REPLACEMENT OR REFUND OF
  45. PURCHASE PRICE.
  46.  
  47.  
  48.  
  49.                                2. LICENSE
  50.  
  51. This software is NOT public domain. It is copyrighted software
  52. distributed as shareware.
  53.  
  54. This software is NOT free. A license fee must be paid if used longer 
  55. than for one month evaluation period. See PAYMENT.DOC for details of the 
  56. payment.
  57.  
  58. If you received this software on a CD-ROM or from a disk vendor, you 
  59. have only paid for the disk. You do NOT have a license to use this 
  60. software.
  61.  
  62. Everybody has the right to copy and distribute this software as long as
  63. it is unmodified and all the original files listed in chapter 4 of this 
  64. document are included. A fee of at most $7 may be charged for the total 
  65. expences of copying. If a copying fee is taken, the receiver of this 
  66. software must be made aware that he has only the evaluation and copying 
  67. license stated above.
  68.  
  69. Remember that you may COPY THIS TO YOUR FRIENDS! This is the idea behind 
  70. shareware. Show this to your boss also (not meaning: if you do not count 
  71. him/her to your friends <g>). SRDISK can prove worth a few megabytes of 
  72. memory to you.
  73.  
  74.  
  75.  
  76.                           3. FEATURES INCLUDED
  77.  
  78. This RAM disk currently supports the following features:
  79.  
  80.   * Compatible with MS-DOS versions from 3 to 6 and DR-DOS 5 to 6.
  81.   * XMS - Extended memory on 286 and up with HIMEM or other XMS 2.0
  82.     driver.
  83.   * EMS - Expanded memory of LIM/EMS version 3.2 and 4.0.
  84.   * Device drivers may be chained to form larger disks using many
  85.     different kind memories.
  86.   * Resizeable - can preserve disk contents if new format has room 
  87.     enough.
  88.   * Removable. Can be disabled without reboot.
  89.   * Supports 32-bit sector addressing introduced in DOS 4. Thus over 32M
  90.     RAM disks are possible if you have the memory.
  91.   * Configurable
  92.       - sector size
  93.       - cluster size
  94.       - root directory entry count
  95.       - number of FATs
  96.   * Predefined DOS and FDFORMAT floppy disk look-alike formats.
  97.   * DISKCOPY compatible with DOS versions from 3.20 up. You can copy
  98.     to/from SRDISK drive using DOS DISKCOPY.
  99.   * Write protection.
  100.   * Can optionally set environment variables SRDISKn (n=1,2,...) to
  101.     the installed SRDISK drive letters.
  102.   * Comes with a dummy drive you can use to locate SRDISK (or any other 
  103.     installable) drive at a higher letter.
  104.  
  105. I have a list of new features to implement in the future. By sending 
  106. money and feature suggestions you can help me make this program still 
  107. better.
  108.  
  109. Users may find that the ability to resize is invaluable. Since some 
  110. programs can take best use of memory by directly using it while others 
  111. need a fast disk for temporary files, you can now have optimal 
  112. performance with both kinds of programs without the trouble of changing 
  113. configuration and rebooting.
  114.  
  115. The feature of being able to resize automagically when there is need for 
  116. it is currently not in my reach. FAT filesystem in DOS just was not 
  117. designed for it. There is some more explanation about it later in this 
  118. document.
  119.  
  120.  
  121.  
  122.                         4. FILES IN THIS RELEASE
  123.  
  124. The following files are distributed in this release:
  125.  
  126.         READ.ME         some notes
  127.         FILE_ID.DIZ     short description of packet for BBS operators
  128.         WHATSNEW.DOC    what is new in this release and history
  129.         SRDISK.DOC      this document
  130.         SRDXMS.SYS      device driver for XMS memory
  131.         SRDXMSS.SYS     device driver for XMS memory (small version)
  132.         SRDEMS.SYS      device driver for EMS 4.0 memory
  133.         SRDEMSS.SYS     device driver for EMS 4.0 memory (small version)
  134.         SRDEMS3.SYS     device driver for EMS 3.2 memory
  135.         SRDUMMY.SYS     device driver for nothing but use drive letters
  136.         SRDISK.EXE      formatter program
  137.         SUOMI.DOC       Finnish version of this document
  138.         DEUTSCH.DOC     German note to German users
  139.         PAYMENT.DOC     registering information
  140.  
  141. The small versions of device drivers do not support DOS DISKCOPY 
  142. compatibility and may require user to make sure there is enough stack 
  143. available by specifying STACKS=8,512 (or similar) in CONFIG.SYS. Also, 
  144. you can not chain another device driver after a small version device 
  145. driver.
  146.  
  147.  
  148.  
  149.                                 5. USAGE
  150.  
  151. The SRDISK is basicly split into two parts:
  152.  
  153.         1) a device driver to add the virtual drive into DOS and
  154.         2) a program to control the device driver
  155.  
  156. The following explains the installation and how to use both of these
  157. parts.
  158.  
  159.  
  160.                         5.1. BASIC INSTALLATION
  161.  
  162. The basic installation for XMS memory can be done following these steps:
  163.  
  164. 1. Copy SRDXMS.SYS into you root directory.
  165.  
  166. 2. Copy SRDISK.EXE into some directory in your PATH.
  167.  
  168. 3. Make sure you have HIMEM.SYS or some other XMS driver installed
  169.    in CONFIG.SYS before the following step.
  170.  
  171. 4. Add into your CONFIG.SYS line
  172.  
  173.         DEVICE=SRDXMS.SYS
  174.  
  175. 5. Add into your AUTOEXEC.BAT after the PATH command line
  176.  
  177.         SRDISK <size>
  178.  
  179. The <size> defines the disk size in Kbytes.
  180.  
  181. If you have EMS memory, then use file SRDEMS.SYS in place of SRDXMS.SYS 
  182. and make sure EMS 4.0 device driver is installed in CONFIG.SYS before 
  183. the SRDEMS.SYS.
  184.  
  185. The device driver adds into DOS a new disk drive. Before you run
  186. SRDISK.EXE or when you set the disk size to zero, the new disk drive
  187. behaves as if you have a floppy drive without a floppy inserted.
  188.  
  189.  
  190.                        5.2. SRDISK DEVICE DRIVER
  191.  
  192. For a RAM disk you need a device driver. This device driver supplies a 
  193. storage for an array of sectors which DOS uses to store all the data. 
  194. SRDISK comes with separate drivers for storing the sectors in XMS 
  195. (extended memory managed by HIMEM.SYS or other XMS driver) and in EMS 
  196. memory.
  197.  
  198. Most often you do not need any parameters for the device drivers, but 
  199. the driver accepts two parameters:
  200.  
  201.         DEVICE=SRDmmm.SYS [d:] [/A]
  202.  
  203. The [] around the parameter mean it is optional; you must not type the
  204. brackets.
  205.  
  206. d:      The 'd:' can be used to tell the driver at what letter it is 
  207.         assigned in case DOS does not let it know it.
  208.  
  209.         Another use for 'd:' is to define into what SRDISK drive the 
  210.         current driver is to be appended.
  211.  
  212.         If you need to have SRDISK at some specific drive letter, you 
  213.         can use SRDUMMY.SYS. Note though, that drive letters are always 
  214.         used in order from A to Z and you can only use up a few drives 
  215.         before the letter you want to use.
  216.  
  217. /A      This tells the driver to append itself to the previously 
  218.         installed SRDISK device driver. The memory accessed using this 
  219.         driver is then available as extra memory to the previously 
  220.         installed SRDISK drive.
  221.  
  222.         If you want the low part of your disk to use XMS and the high 
  223.         part EMS memory, you can put these two lines into your 
  224.         CONFIG.SYS
  225.  
  226.                 DEVICE=SRDXMS.SYS
  227.                 DEVICE=SRDEMS.SYS /A
  228.  
  229.         For this to work, the first device driver must have the extra 
  230.         code to look into the next driver for more memory. Therefore the 
  231.         first device driver must not be the small version SRDXMSS.SYS or 
  232.         SRDEMSS.SYS.
  233.  
  234. Merely installing the driver gives you no RAM disk. It is as if you had 
  235. installed a floppy drive without putting a disk in the drive. For that 
  236. you need the SRDISK.EXE program.
  237.  
  238. The following chapters give some explanation about the different memory 
  239. types and explains reasons for the problems there are.
  240.  
  241.  
  242.                     5.2.1. XMS MEMORY DEVICE DRIVER
  243.  
  244. 8088 processor instruction set can only access memory at addresses from 
  245. 0 to 1048575 (1 megabyte) and memory above the address 1048575 is called 
  246. extended memory. i80286 had a new mode (protected mode) where the 
  247. instructions had a little different meanings and could be used to 
  248. address memory above the 1 megabyte limit.
  249.  
  250. XMS (eXtended Memory Specification) is a means to control the usage of 
  251. extended memory between applications so that each application can have 
  252. exclusive access to some range of addresses without fear the other 
  253. application would be using the same memory for its own purposes.
  254.  
  255. When SRDISK (or any other XMS client) needs extended memory, it requests 
  256. it from extended memory manager (EMM) that follows the eXtended Memory 
  257. Specification. Most common and free such memory manager is HIMEM.SYS.
  258.  
  259. The EMM then tries to find available memory block (a contiguous range of 
  260. addresses available) that is as large or larger than the requested 
  261. memory block. If all of the available blocks are smaller than the 
  262. requested size, the request fails even if the available blocks would be 
  263. large enough when combined.
  264.  
  265. Since DOS and DOS programs still run in the 8088 mode where instructions 
  266. can not address memory beyond 1 megabyte limit, there is no way for them 
  267. to access the memory directly. XMS also defines service to copy memory 
  268. to and from the memory beyond the 1 megabyte limit.
  269.  
  270.  
  271.                     5.2.2. EMS MEMORY DEVICE DRIVER
  272.  
  273. Since 8088 could only address memory up to 1 megabyte, any memory added 
  274. had to be made to use the same addresses with already existing memory. 
  275. Some new hardware had to be added so that the memory occupying a range 
  276. of addresses could be switched with another block of memory. 
  277. Lotus/Intel/MicroSoft Expanded Memory Specification (LIM EMS) was 
  278. developed to provide standardized access to this memory for much the 
  279. same reason XMS was developed to provide access to extended memory.
  280.  
  281. EMS uses a 64K memory area divided into four separate 16K windows to 
  282. access the expanded memory. These windows show different 16K blocks of 
  283. EMS memory (called pages) as requested by the application.
  284.  
  285. EMS memory can also be simulated very efficiently with 386 virtual 
  286. memory. For example EMM386 uses this method to convert extended memory 
  287. into expanded memory.
  288.  
  289. Since EMS memory is consisted of separate 16K pages, there is no 
  290. requirement to have the allocated memory be in contiguous blocks as with 
  291. XMS memory. Since all the available memory can be allocated, you can 
  292. better predict how much memory you can allocate.
  293.  
  294.  
  295.                     5.2.3. EMS 3.2 MEMORY DEVICE DRIVER
  296.  
  297. EMS 3.2 is an older version of EMS. 4.0 is the currently most used one.
  298.  
  299. The main reason SRDISK has version 3.2 driver is that MS-Windows 3.1 has 
  300. a serious bug in the EMS protection it uses. Basicly with the EMS 3.2 
  301. driver you can access EMS disk that has been allocated before starting 
  302. MS-Windows but not one that is allocated inside DOS window. With the EMS 
  303. 4.0 driver you can not access memory allocated before starting 
  304. MS-Windows but can well access memory that is allocated inside DOS 
  305. window.
  306.  
  307. In any case, MS-Windows will not allow any other process access the 
  308. disk allocated in another process.
  309.  
  310.  
  311.                        5.3. SRDUMMY DEVICE DRIVER
  312.  
  313. SRDUMMY.SYS can be used to force installable device drivers to some 
  314. specific drive letters. To better understand what for you might need it, 
  315. read the following paragraph.
  316.  
  317. DOS allocates drives in order from A to Z. The first drives A and B are 
  318. always used for floppy drives. If you have hard disks, drives from C up 
  319. are allocated to them by DOS before CONFIG.SYS is loaded. After all the 
  320. standard hardware drives have been assigned, DOS reads the CONFIG.SYS 
  321. and loads the devices found there. Each block device driver (a device 
  322. supplying only an array of blocks of data, like SRDISK) is assigned one 
  323. or more drive letters in the order they are in CONFIG.SYS. The device 
  324. drivers can not determine to which drives they get assigned.
  325.  
  326. SRDUMMY.SYS tells DOS it provides one or more block devices and thus 
  327. uses up some drive letters. There will not be any drives though, and if 
  328. you access the drives, you'll get the drive not ready error.
  329.  
  330. SRDUMMY.SYS takes one parameter: The drive letter the next block device 
  331. should be loaded to.
  332.  
  333. Take a look at the following sample CONFIG.SYS:
  334.  
  335.         DEVICE=SRDXMS.SYS
  336.         DEVICE=SRDUMMY.SYS G:
  337.         DEVICE=SRDEMS.SYS
  338.  
  339. If you have one hard disk, the floppies and hard disk use letters A-C. 
  340. SRDXMS.SYS is then loaded to D and SRDUMMY.SYS uses drives E and F.
  341. SRDEMS.SYS loads thus at G.
  342.  
  343. If you add a second hard drive, it will take drive letter D and 
  344. SRDXMS.SYS will then be at E and SRDUMMY.SYS use only drive F putting
  345. SRDEMS.SYS to G again.
  346.  
  347. If you add a few more drives so that drive G is already in use before 
  348. SRDUMMY.SYS gets loaded, you will only get a warning message from 
  349. SRDUMMY.SYS and the SRDEMS.SYS will load at the next available drive 
  350. letter.
  351.  
  352. DR-DOS 6 seems not to allow access to drive letters after P: even with 
  353. LASTDRIVE=Z statement in CONFIG.SYS. So with DR-DOS you must avoid using 
  354. the last drive letters after P:.
  355.  
  356.  
  357.                           5.4. SRDISK PROGRAM
  358.  
  359. The disk can be enabled by, for example, using command "SRDISK 1024"
  360. which will make first SRDISK a 1024K disk. It can be disabled by making
  361. it of size 0: "SRDISK 0".
  362.  
  363. You should include the command to enable the RAM disk into your
  364. AUTOEXEC.BAT file.
  365.  
  366. The SRDISK.EXE is self documented. You'll get the documentation by
  367. typing at the DOS prompt "SRDISK /?" and hitting enter. To get a hang of
  368. it better, some examples with explanations are given below.
  369.  
  370.  
  371.                      5.4.1. SRDISK SAMPLE COMMANDS
  372.  
  373. Command
  374.  
  375.         SRDISK 1024
  376.  
  377. creates or changes the old disk to a 1024K (= 1M) disk.
  378.  
  379. More precisely it calculates various disk parameters as it best sees fit
  380. for most users needs. Those disk parameters can be defined by user on
  381. the command line if the calculated values do not meet his needs. After
  382. the parameters have been calculated, the memory (1024K = 1M) needed for
  383. the disk is allocated and a disk image is created into the memory.
  384.  
  385. The calculated parameters include sector size, cluster size, number of
  386. FATs and root directory size.
  387.  
  388. - Sector is the basic unit of storage. It's size does not mean much, but
  389.   it has to be a power of 2 and no larger than 512 bytes.
  390.  
  391. - Cluster size tells in how large blocks the space is allocated. Larger
  392.   clusters mean smaller FAT (= File Allocation Table), but then even the
  393.   smallest file always takes at least that much space. Cluster can not
  394.   be smaller than one sector. A cluster is a collection of sectors.
  395.  
  396. - FAT is the table that holds information about each allocation unit,
  397.   cluster, on the disk. The information can be indication that the
  398.   cluster is free, or where the next cluster of the file is or that the
  399.   cluster is unusable. A disk only needs one FAT - though multiple
  400.   copies of it can be specified. Note that the other FATs are only
  401.   copies of the first one.
  402.  
  403. - Root directory is limited to hold only some predefined number of
  404.   files. If you get "Can not create file" errors while there is plenty
  405.   of free space on disk, you need to make the root directory larger.
  406.   Alternatively you should create a subdirectory and create the files
  407.   there. Subdirectories can be arbitrarily large.
  408.  
  409. If there is data on the disk to be preserved, sector and cluster size 
  410. are not changed.
  411.  
  412. Command
  413.  
  414.         SRDISK 1024 /O
  415.  
  416. does the same as the command 'SRDISK 1024' except the various disk
  417. parameters are not calculated but instead the old parameters are used.
  418.  
  419. Command
  420.  
  421.         SRDISK /F:1440
  422.  
  423. tries to create the disk to look like a real floppy disk. It also 
  424. defines some parameters that otherwise have no effect like media 
  425. descriptor, number of heads and sectors per track. These parameters have 
  426. no other function but to make it look like it is a real, physical disk - 
  427. which it is not. SRDISK drives are not accessible through BIOS, so some 
  428. diskcopy and utility programs can fail if used with SRDISK.
  429.  
  430. Command
  431.  
  432.         SRDISK /S:256 /C:1024 /D:64
  433.  
  434. reformats the disk. The size is determined by the old size of the disk
  435. even without the use of /O. Sector size is changed to 256 bytes, cluster
  436. size to 1024 bytes (two sectors) and root directory will hold 64 entries
  437. (one of which is used for the volume label).
  438.  
  439. Command
  440.  
  441.         SRDISK /U
  442.  
  443. clears the disk. It recalculates the format and makes it better if 
  444. possible, but preserves the disk size. Without this switch, the disk 
  445. contents are preserved if possible. This is also usefull if you can not 
  446. resize the disk because of errors on it -- using this option the errors 
  447. will be ignored and the disk is made whole new.
  448.  
  449. Command
  450.  
  451.         SRDISK E:
  452.  
  453. tests if E is a SRDISK RAMdisk and, as no format is defined, display
  454. it's current configuration. The letter may not correspond to the letter
  455. known by DOS for the drive if the letter is defined wrong when
  456. installing the SRDISK.SYS device driver in CONFIG.SYS.
  457.  
  458. Command
  459.  
  460.         SRDISK
  461.  
  462. without the drive letter specified tries to determine the drive by first
  463. trying the current drive and if it is not a SRDISK drive, then the first
  464. SRDISK drive loaded in CONFIG.SYS. As no change in the format is
  465. defined, the current configuration of the found drive are displayed.
  466.  
  467.  
  468.                    5.4.2. SRDISK COMMAND LINE OPTIONS
  469.  
  470. To ease remembering the command line options, SRDISK has for some 
  471. settings several different options. Many of the options are long, but 
  472. you can truncate them if you write enough for SRDISK to identify the 
  473. option unambiguously.
  474.  
  475. An exact match in the full lenght of the option is always identified 
  476. instead of some another option that begins with the same characters.
  477.  
  478. All numeric parameters for the options are translated using the C 
  479. language rules: Number starting with 0 is octal number (base eight) and 
  480. with 0x is hexadecimal (base 16), others are decimal.
  481.  
  482. The options in alphabetical order are
  483.  
  484.   /?               List of most important command line options
  485.   /A:n             Number of FAT copies (1 or 2)
  486.   /ASK             Ask for confirmation if data would be lost
  487.   /AVAILABLE:n     Resize to disk to have n Kbytes of space available
  488.   /C:n             Cluster size
  489.   /CLUSTER:n       Same as /C
  490.   /D:n             Dir entries
  491.   /DEVICETYPE:n    Device type for DISKCOPY compatibility
  492.   /DIRENTRIES:n    Same as /D
  493.   /DOSFORMAT:n     DOS or FDFORMAT lookalike format
  494.   /E               Set environment variables SRDISKn
  495.   /ENVIRONMENT     Same as /E
  496.   /ERASE           Clear disk contents, implies /FORCE
  497.   /F:n             Same as /DOSFORMAT
  498.   /FATS:n          Same as /A
  499.   /FILESPACE:n     Make the disk have n Kbytes space for files
  500.   /FORCE           Destroy data if necessary to force new format
  501.   /FREEMEM:n       Determine disk size to leave at least n Kbytes mem free
  502.   /H               Same as /?
  503.   /HEADS:n         Number of heads for DISKCOPY compatibility
  504.   /HELP            Same as /?
  505.   /M:n[:n...]      Max sizes for different drivers chained to a drive
  506.   /MAXSIZE         Allocate the disk as large as it can safely be allocated
  507.   /MEDIA:n         Media ID byte for DISKCOPY compatibility
  508.   /MINSIZE         Alias to /AVAILABLE:0, minimize the disk
  509.   /NO              NO, do not destroy data to complete new format
  510.   /O               Use old disk format where not redefined
  511.   /OLD             Same as /O
  512.   /REGISTER        Display registration information
  513.   /REMOVABLE:x     Tell DOS the drive is removable if x is ON.
  514.   /S:n             Sector size (128, 256 or 512 bytes)
  515.   /SECTORS:n       Number of sectors per track
  516.   /SECTORSIZE:n    Same as /S
  517.   /SIDES:n         Same as /HEADS
  518.   /SPT:n           Same as /SECTORS
  519.   /U               Same as /ERASE, FORMAT compatible
  520.   /UNCONDITIONAL   Same as /ERASE /FORCE
  521.   /V:n             Verbose level (1-5) to control amount of output
  522.   /VERBOSE:n       Same as /V
  523.   /W:x             Write protection x is ON/+ or OFF/-
  524.   /WRITEPROTECT:x  Same as /W
  525.   /Y               Same as /FORCE
  526.   /YES             Same as /FORCE
  527.  
  528. The options by function
  529.  
  530.   /? /H /HELP
  531.  
  532.         List the most important command line options and exit.
  533.  
  534.   /A:n /FATS:n
  535.  
  536.         Number of FAT copies (1 or 2). You need only one FAT unless you 
  537.         need to make the disk look like some floppy disk.
  538.  
  539.   /AVAILABLE:n /MINSIZE
  540.  
  541.         Space available on the disk. The disk size will be counted to be 
  542.         large enough to hold the files already on it and to have n 
  543.         Kbytes of space available.
  544.  
  545.         /MINSIZE is the same as /AVAILABLE:0 and will also make the root 
  546.         directory smaller.
  547.  
  548.   /C:n /CLUSTER:n
  549.  
  550.         Cluster size. Cluster is the unit used to allocate disk space.
  551.         This option has effect on the space used for File Allocation 
  552.         Table. If cluster size is small, bigger FAT is needed and there 
  553.         is less room for files, but files may take more room.
  554.  
  555.   /D:n /DIRENTRIES:n
  556.  
  557.         Root directory entries. FAT file system has fixed size root 
  558.         directory. You can specify the size for it using this option.
  559.  
  560.         Note that each entry is 32 bytes long and a fixed amount of 
  561.         sectors are used to hold the entries. Thus if sector size is 512 
  562.         bytes each sector can hold 16 entries (512 / 32 = 16) and 
  563.         specifying /D:4 or /D:16 uses exactly the same amount of space 
  564.         on the disk: one sector.
  565.  
  566.         If there is nothing against it, I start to round the number of 
  567.         root directory entries up to fill the last root directory 
  568.         sector. Some utility programs can be confused if the last sector 
  569.         is only partially used.
  570.  
  571.   /DEVICETYPE:n
  572.  
  573.         DOS does not care what type the device is, but in case some 
  574.         utility program asks DOS for the type it can be specified with 
  575.         this switch. This is normally set correctly if you use the /F 
  576.         switch. Device types are
  577.  
  578.                 0 = 360K
  579.                 1 = 1.2M
  580.                 2 = 720K
  581.                 3 = 8-inch single-density
  582.                 4 = 8-inch double-density
  583.                 5 = Hard disk
  584.                 6 = Tape drive
  585.                 7 = 1.44M
  586.                 8 = Read/Write optical
  587.                 9 = 2.88M
  588.  
  589.   /E /ENVIRONMENT
  590.  
  591.         Set environment variables SRDISK1, SRDISK2 etc. to the drive 
  592.         letters or SRDISK drives installed. You can then use the 
  593.         variables in batch files to access the RAM disk.
  594.  
  595.         For example:
  596.  
  597.                 REM Set environment variables without much output and
  598.                 REM make a tiny disk at the same time
  599.                 SRDISK /E /V:1 /F:1
  600.                 SET TMP=%SRDISK1%:\TMP
  601.                 MKDIR %TMP%
  602.  
  603.                 IF "%SRDISK2%" == "" ECHO You have only one SRDISK drive
  604.  
  605.   /F:n /DOSFORMAT:n
  606.  
  607.         DOS or FDFORMAT lookalike formats. The number n defines the disk 
  608.         size in Kbytes. This option also sets all the other parameters 
  609.         besides the size to match the corresponding DOS or FDFORMAT 
  610.         created floppy disk.
  611.  
  612.         The currently supported formats are
  613.  
  614.           Size Media Device SPT Head Root
  615.  
  616.            160  FE     360   8   1    64    DOS
  617.            180  FC     360   9   1    64    DOS
  618.            200  FD     360  10   1   112    FDFORMAT
  619.            205  FD     360  10   1   112    FDFORMAT
  620.            320  FF     360   8   2   112    DOS
  621.            360  FD     360   9   2   112    DOS
  622.            400  FD     360  10   2   112    FDFORMAT
  623.            410  FD     360  10   2   112    FDFORMAT
  624.            640  FB     720   8   2   112    DOS
  625.            720  F9     720   9   2   112    DOS
  626.            800  F9     720  10   2   112    FDFORMAT
  627.            820  F9     720  10   2   112    FDFORMAT
  628.           1200  F9     1.2  15   2   224    DOS
  629.           1440  F0    1.44  18   2   224    DOS
  630.           1476  F0    1.44  18   2   224    FDFORMAT
  631.           1600  F0    1.44  20   2   224    FDFORMAT
  632.           1640  F0    1.44  20   2   224    FDFORMAT
  633.           1680  F0    1.44  21   2   224    FDFORMAT
  634.           1722  F0    1.44  21   2   224    FDFORMAT
  635.           2880  F0    2.88  24   2   240    DOS
  636.  
  637.         In addition to these there is a special format 1 to make a mini 
  638.         disk. This can be used if you have your RAM disk in your PATH 
  639.         and do not want to get Drive Not Ready errors when you have 
  640.         freed the memory for RAM disk. Check your memory manager though: 
  641.         some memory managers allocate memory in 16K chunks and a 1K disk 
  642.         uses as much memory as a 16K disk does.
  643.  
  644.   /FILESPACE:n
  645.  
  646.         Space available for files. The disk will be larger than n 
  647.         Kbytes, since file allocation table and root directory always 
  648.         take some space too.
  649.  
  650.         Note that files usually take some extra space because the space 
  651.         for them is allocated in clusters. For example, if cluster size 
  652.         is 1024 bytes (1K), any file this long or smaller (but not 0 
  653.         bytes) will use one cluster and thus 1024 bytes.
  654.  
  655.         Subdirectories also use file space.
  656.  
  657.   /FREEMEM:n /MAXSIZE
  658.  
  659.         Memory available for other programs. The disk will be sized to 
  660.         leave at least n Kbytes of memory to other programs. The disk 
  661.         size may be less than necessary if there is some uncertainty 
  662.         whether or not all the memory can be allocated.
  663.  
  664.         FOR XMS MEMORY, THIS CAN ALLOCATE LESS THAN THERE IS AVAILABLE 
  665.         SINCE XMS CAN NOT RELIABLY PUT ALL FREE MEMORY IN ONE BLOCK. 
  666.         ALSO, SINCE SOME MEMORY MANAGERS ALLOCATE MEMORY IN BLOCKS OF 4 
  667.         OR 16 KBYTES, THERE MIGHT BE 15 KBYTES LESS FREE MEMORY THAN 
  668.         REQUESTED.
  669.  
  670.         The disk can also be disabled if more free memory is requested 
  671.         than there is available.
  672.  
  673.         /MAXSIZE is same as /FREEMEM:0, thus using all safely available 
  674.         memory for the disk.
  675.  
  676.         If some program of yours needs free memory and you do not care 
  677.         for disk contents, you can put for example
  678.  
  679.                 SRDISK /FREEMEM:1024 /YES
  680.  
  681.         into a batch file to start to program. The /YES gives permission 
  682.         to clear the disk if the disk can not be made small enough 
  683.         otherwise.
  684.  
  685.   /HEADS:n /SIDES:n
  686.  
  687.         Number of heads for DISKCOPY compatibility. This is normally set 
  688.         correctly if you use the /F switch.
  689.  
  690.   /M:n[:n...]
  691.  
  692.         Max sizes for different drivers chained to a drive.
  693.  
  694.         Normally SRDISK uses as much space as is available on the first 
  695.         driver and only then starts allocating on the second one. If you 
  696.         want to use only up to some amount of memory on the different 
  697.         drivers chained to one drive, you can define the amounts with 
  698.         this option.
  699.  
  700.         For example to define first driver use only 100K of memory, give 
  701.         command
  702.  
  703.                 SRDISK /M:100
  704.  
  705.         If you would have three or more drivers chained into one drive, 
  706.         you could define first and third to use 100K and let the other 
  707.         drivers use as much as they were allowed to use before with 
  708.         command
  709.  
  710.                 SRDISK /M:100::100
  711.  
  712.   /MEDIA:n
  713.  
  714.         Media ID byte for DISKCOPY compatibility. This is normally set 
  715.         correctly if you use the /F switch.
  716.  
  717.         Use Media IDs in the range from 0xF0 to 0xFF. Smaller values 
  718.         make CHKDSK report that it is possibly non-DOS format media.
  719.  
  720.   /O /OLD
  721.  
  722.         Use old disk format where not explicitly redefined with command
  723.         line options.
  724.  
  725.   /REGISTER
  726.  
  727.         Displays the registration information.
  728.  
  729.   /REMOVABLE:x
  730.  
  731.         This is for advanced users only. If you do not know all the 
  732.         possible effects of this switch, you better leave it alone.
  733.  
  734.         This is provided to allow fooling programs which misbehave when 
  735.         they see a removable RAM disk. If the x is ON, + or nothing, the 
  736.         device driver reports the disk correctly as removable. If the x 
  737.         is OFF or -, the device driver reports the disk not removable in 
  738.         the same way RAMDRIVE does. It also prohibits SRDISK.EXE from 
  739.         reformatting the disk.
  740.  
  741.   /S:n /SECTORSIZE:n
  742.  
  743.         Sector size (128, 256 or 512 bytes). Sector is the basic 
  744.         allocation unit of a disk. Smaller sector size can decrease the 
  745.         amount of memory wasted on boot sector, FAT and root directory, 
  746.         but that is just about the only benefit of it. Clusters are 
  747.         formed of sectors, so sector size can not be larger than cluster 
  748.         size. DOS uses by default 512 bytes per sectors.
  749.  
  750.   /SECTORS:n /SPT:n
  751.  
  752.         Number of sectors per track for DISKCOPY compatibility. This is 
  753.         normally set correctly if you use the /F switch.
  754.  
  755.   /U /UNCONDITIONAL /ERASE
  756.  
  757.         Clear disk contents. This implies option /YES.
  758.  
  759.         If your disk gets corrupted and SRDISK refuces to reformat it, 
  760.         try this switch. SRDISK should not then care about the current 
  761.         disk, but rather just wipes it off and creates a new one.
  762.  
  763.   /V:n /VERBOSE:n
  764.  
  765.         Verbose level (1-5) to control amount of output. With /V:1 you 
  766.         can limit the output to the title.
  767.  
  768.   /W:x /WRITEPROTECT:x
  769.  
  770.         Write protection contol. The parameter x can be ON, + or nothing 
  771.         to enable the write protection or OFF or - to disable it.
  772.  
  773.   /Y /YES /FORCE
  774.   /NO
  775.   /ASK
  776.  
  777.         These are to control the need of user intervention.
  778.  
  779.         All questions in SRDISK are formed so that answer YES will give 
  780.         permission to destroy data and continue, while NO will abort the 
  781.         operation and try to preserve the data on the disk. By these 
  782.         options you can give the answer on the command line.
  783.  
  784.         /ASK is the default and means the user will be prompted to make 
  785.         choise.
  786.  
  787.  
  788.  
  789.                            6. TROUBLESHOOTING
  790.  
  791. Causes of grief
  792.  
  793. 1. RAM disks loose their contents when power is turned off! Do not store
  794. anything valuable there.
  795.  
  796. 2. There is no XMS nor EMS memory without a proper device driver. 
  797. HIMEM.SYS will do for XMS. For EMS you need to install the device driver 
  798. that came with your expanded memory hardware. QEMM can supply both on 
  799. 386 or better hardware and you might be better off using the SRDEMS 
  800. driver with it.
  801.  
  802. 3. Not all HIMEM.SYS support memory above 16M limit. HIMEM.SYS versions 
  803. 2.78 and later should be good. Also these later versions may be limited 
  804. to 128000K blocks; solution is to link two (or more) SRDXMS.SYS drivers 
  805. (i.e. add "DEVICE=SRDXMS.SYS /A" line to CONFIG.SYS) and limit the first 
  806. one with command "SRDISK /M:128000". This will only break the /MAXSIZE 
  807. option.
  808.  
  809. 4. DR-DOS 5 HIDOS.SYS does not implement the XMS resize function. 
  810. Therefore SRDISK may not be able to resize the disk unless you replace 
  811. the HIDOS.SYS with HIMEM.SYS.
  812.  
  813. 5. Some programs swap themselves for a shell to the ramdisk. If you
  814. change the format of the disk or clear the disk from such program, the
  815. swapped program may not be able to recover and can crash your computer.
  816.  
  817. 6. Some disk caching programs are reported to cache SRDISK too! This can 
  818. cause a system crash and caching a RAM disk is anyway useless. If you 
  819. use a disk cache, please load it before SRDxxx.SYS or tell it explicitly 
  820. not to cache the SRDISK drive.
  821.  
  822. 7. SRDISK needs it's XMS memory in one contiguous area. Therefore if
  823. SRDISK complaints about insufficient memory while you have plenty of it 
  824. free, the reason might be that some other program uses a piece of the
  825. memory in the middle of the available memory. If you have a choise, use 
  826. EMS since it does not (usually) have this problem.
  827.  
  828. 8. There can be problems with XMS memory when not enough of it can be
  829. allocated. This may result in lost disk contents. Also some memory 
  830. managers that provide both XMS and EMS (like QEMM and the EMM386.EXE of 
  831. MS-DOS 6) can fool SRDISK to think there is more memory available than 
  832. there really is if SRDISK uses both XMS and EMS memory for the disk.
  833.  
  834. 9. Some multitasking environments (like MS-Windows) can free the memory 
  835. allocated under them to the RAM disk. This will cause the data to be 
  836. lost and errors in programs that try to access the disk.
  837.  
  838. 10. MS-Windows has buggy memory protection that prevents programs from 
  839. accessing memory allocated in another session. It also prevents using 
  840. EMS memory allocated for the SRDEMS.SYS driver outside Windows and for 
  841. the SRDEMS3.SYS driver inside Windows. In general you may find it better 
  842. to use SRDEMS3.SYS or SRDXMS.SYS and allocate any disk you will use 
  843. before starting Windows and never resize any disk while inside Windows.
  844.  
  845.  
  846.  
  847.                              7. TRADEMARKS
  848.  
  849. Oh, and we should not forget these (I can not verify they are correct, 
  850. but still):
  851.  
  852. QEMM is a trademark of Quartedreck Office Systems Inc.
  853. Microsoft, MS-DOS, SmartDrive and Windows are trademarks of Microsoft 
  854. Corporation. DR-DOS is a trademark of Novell. Intel is a trademark of 
  855. Intel Corporation. Lotus is trademark of Lotus Development Corporation.
  856.  
  857. FDFORMAT is copyrighted by (and trademark of?) Christoph H. Hochstätter,
  858. Germany. Nice work.
  859.  
  860. SRDISK is my trademark.
  861.  
  862. If any mentioned trademarks are not included in this list, please tell 
  863. me about them. They are anyway hereby acknowledged.
  864.  
  865.  
  866.  
  867.                              8. LAST WORDS
  868.  
  869. Please, if you know of a way to get around the Windows 3.1 memory 
  870. protection, let me know about it.
  871.  
  872. You can contact me by sending E-mail from
  873.  
  874.         Internet to `Marko.Kohtala@compart.fi'
  875.         CompuServe to `>INTERNET:Marko.Kohtala@compart.fi'
  876.  
  877. If the above address fails (if you do not get a reply, it propably has 
  878. failed), I can still be reached at `Marko.Kohtala@hut.fi'.
  879.  
  880. My surface mail address is
  881.  
  882.         Marko Kohtala
  883.         PL 115
  884.         FIN-01451 Vantaa
  885.         FINLAND
  886.  
  887. You can also call Airline BBS, 24H, HST, V.32, V.42, MNP, +358-0-8725380 
  888. and leave mail at the PRIV area to me, Marko Kohtala (sorry, no 
  889. netmail there). You can also always get the latest release of SRDISK 
  890. from there.
  891.  
  892. If you have access to Fidonet, Bitnet, UUCP mail or just about any 
  893. network, ask your system operator if you can mail to Internet.
  894.  
  895. You can find the latest release of SRDISK in United States, Illinois at
  896.  
  897.         The Midrange System BBS
  898.         Sysop: David Gibbs
  899.         FidoNet: 1:115/439
  900.         Phones: 708-776-1062 and 708-776-1063, both have HST and V.32
  901.         Using Remote Access
  902.  
  903. You can file request latest version using magic file name SRDISK.
  904.  
  905.